<?php

namespace app\admin\model;

use app\admin\model\Common;
use app\crm\model\Customer;
use app\crm\model\Service;
use app\admin\model\ShopPerson;
use app\admin\model\Goods;
use app\admin\model\ShopModel;
use app\crm\model\ShopOrderGoods;
use think\facade\Db;


class ServiceLog extends Common
{
    protected $name = 'service_log';

    public function service(){
        return $this->hasOne(Service::class,'id','service_id');
    }

    public function nurseIdOne(){
        return $this->hasOne(ShopPerson::class,'id','nurse_id_one');
    }
    public function nurseIdTwo(){
        return $this->hasOne(ShopPerson::class,'id','nurse_id_two');
    }

    public function nurseOne(){
        return $this->hasOne(ShopPerson::class,'id','nurse_one');
    }

    public function nurseTwo(){
        return $this->hasOne(ShopPerson::class,'id','nurse_two');
    }

    public function customer(){
        return $this->hasOne(Customer::class,'id','customer_id');
    }

    public function goods(){
        return $this->hasOne(Goods::class,'id','goods_id');
    }

    public function shop(){
        return $this->hasOne(ShopModel::class,'shop_id','shop_id');
    }


}
